import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [

  // 登陆
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login.vue'),
  },
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/Home.vue'),
    redirect: "profile",
    children: [{
      path: "/profile",
      name: 'profile',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/profile.vue'),
    },
    {
      path: "/chart",
      name: 'chart',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/chart.vue'),
    },
    {
      path: "/user/manage",
      name: 'manage',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/manage.vue'),
    },
    {
      path: "/user/role",
      name: 'role',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/role.vue'),
    },
    {
      path: "/user/permission",
      name: 'permission',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/permission.vue'),
    },
    {
      path: "/article/ranking",
      name: 'ranking',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/ranking.vue'),
    },
    {
      path: "/article/create",
      name: 'create',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/create.vue'),
    },
    {
      path: "/import",
      name: 'import',
      component: () => import(/* webpackChunkName: "Test" */'@/views/list/import.vue'),
    },
    ]
  },


]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
